package com.ruoyi.system.chat.service;

import com.ruoyi.common.chat.exception.*;
import com.ruoyi.system.chat.chatqwen.entity.ChatRequestEntity;
import com.ruoyi.system.chat.entity.AiResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


public interface ChatService {

//    ApiKeyBalanceEntity queryBalance(String apiKey) throws JsonProcessingException;
//
//    ApiKeyBalanceEntity queryBalance(String apiKey, AiPlatformEntity platformEntity)
//            throws JsonProcessingException;

    AiResponseEntity chat(@RequestBody ChatRequestEntity chatRequestEntity,
                          HttpServletRequest request,
                          HttpServletResponse response) throws IOException,
            BalanceInsufficientException, BalanceDeductException, ChatException,
            ChatConcurrentException, SensitiveWordsException;


//    long countByQueryParam(String username, String email,Date startTime, Date endTime);

//    Page<ChatLogEntity> findByQueryParam(String username, String email, Date startTime, Date endTime, int page, int size);
}
